Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1879249710
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| def initialize(endian: :little, type: :REL) | ||
| @ident = IDENT | ||
| @type = num2bytes(ELF_FILE_TYPE[elf(type)], 2) | ||
| @arch = arch(arc) | ||
| @type = num2bytes(ELF_FILE_TYPE[type], 2) | ||
| @arch = num2bytes(62, 2) # target: e_machine EM_x86_64 |
There was a problem hiding this comment.
Preserve Header.new keyword/type normalization
The initializer now directly indexes ELF_FILE_TYPE[type] and dropped the previous normalization logic, so callers that still pass type: :rel/:exec or string values (which were accepted before) will now hit nil and raise a TypeError inside num2bytes. Also, removing the arc: keyword means any existing caller supplying arc: now gets an ArgumentError. This is a runtime regression for existing usage patterns; consider keeping the normalization/keyword or raising a clearer validation error.
Useful? React with 👍 / 👎.
ELF::Reeader now reads e_type/e_machine and sets them on Header Header exposes #type/#arch and supports set!(arch:) Add minimal C fixture for shared object input
--shared+linker=selfemits ET_DYN (nodlopenguarantee yet).e_type == ET_DYN.main._start-style stub (call main; exit)..dynamic/.dynsym/runtime relocations are not implemented yet.mainlookup and exec stub injection whenshared: true.e_entryappropriately (0 / unused).ET_DYN.